<meta charset="UTF-8"/>
<div id="h">
    <ul class="layui-nav" lay-filter="">
        <li class="layui-nav-item" id="index"><a href="/">首页</a></li>
        <li class="layui-nav-item" id="boutique"><a href="/boutique">精品资源</a></li>
        <li class="layui-nav-item" id="notice"><a href="/notice">通知公告</a></li>
        <li class="layui-nav-item" id="about"><a href="/about">平台简介</a></li>
        <li th:if="${session.currentUser != null}" class="layui-nav-item" style="float: right;">
            <a href="/index">
                <img th:src="(${session.currentUser.avatar} == '') ? @{/img/profile.jpg} : @{${session.currentUser.avatar}}"
                     class="layui-nav-img" th:text="${session.currentUser.loginName}">
            </a>
            <dl class="layui-nav-child">
                <dd><a onclick="showModifyPassword()">修改密码</a></dd>
                <dd><a href="/logout">安全退出</a></dd>
            </dl>
        </li>
        <li th:if="${session.currentUser!=null}" class="layui-nav-item" style="float: right;">
            <a href="/index">个人中心</a>
        </li>
        <li th:if="${session.currentUser!=null and session.currentUser.messageCount!=0}" class="layui-nav-item"
            style="float: right;">
            <a href="#" title="请进入个人中心-评论消息模块查看未读消息">系统消息<span class="layui-badge" id="messageCount"
                                                  th:text="${session.currentUser.messageCount}"></span></a>
        </li>
        <li th:if="${session.currentUser==null}" class="layui-nav-item" style="float: right;"><a
            onclick="showRegister()" style="padding-left: 8px;padding-right: 8px;" target="_blank">注册</a></li>
        <li th:if="${session.currentUser==null}" class="layui-nav-item" style="float: right;"><a onclick="showLogin()"
                                                                                                 style="padding-left: 8px;padding-right: 8px;"
                                                                                                 target="_blank">登录</a>
        </li>
    </ul>
</div>